<template>
	<div id="tmpl">		
		<ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="item in list">
					<router-link to="">
						<img class="mui-media-object mui-pull-left" :src="item.img_url">
						<div class="mui-media-body">
							<p v-text="item.title"></p>
							<p class='mui-ellipsis'>{{item.zhaiyao}}</p>
						</div>
						<div class="ft">
							<span>{{item.add_time | datefmt('YYYY-MM-DD hh:mm:ss')}}</span>
							<span class="click">{{item.click}}</span>
						</div>
					</router-link>
				</li>
		</ul>
	</div>
</template>
<script>
import {Toast} from 'mint-ui';
	export default{
		data(){
			return {
				list:[
				
				],
			}
		},
		created(){
			this.getnewsList();
		},
		methods:{
			getnewsList(){
				var url = 'http://webhm.top:8899/api/getnewslist';
				this.$http.get(url)
				.then(function(res){
					if(res.body.status!=0){
						Toast(res.body.message);
						return;
					}
					this.list = res.body.message;
				})
			},
		}
	}
</script>
<style scoped>
	.mui-table-view .mui-media-object{
		width: 80px;
		height: 80px;
		line-height: 80px;
		max-height: 80px;
		max-width: 80px;
	}
	.mui-table-view-cell .ft{
		font-size: 14px;
		margin-top: 20px;
		margin-bottom: 1em;
		color:#007AFF;
	}
	.mui-table-view-cell .ft .click{
		margin-left: 10px;
	}
</style>